<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path;
%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<html style="font-size: 50px;" g_init="2210240201807052118">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <title>我的积分</title>

    <link rel="stylesheet" type="text/css" href="<%=path%>/css/aem-h5/aem-h5.css"/>
</head>
<body>
<input type="hidden" value="<%=basePath%>" id="basePath">
<div id="app">
    <div>
        <div class="change">
            <div class="change-left clearfix">
                <div class="change-item1">
                    <div class="item1-tt">累计获得积分</div>
                    <div class="item1-ct"><span id="historyIntegarl"></span></div>
                </div>
                <div class="change-item2">
                    <div class="item2-tt">剩余积分</div>
                    <div class="item2-ct"><span id="Integral"></span></div>
                </div>
            </div>
            <a class="rule" onclick="IntegralRecod()">
                <div class="change-right">兑换记录&gt;</div>
            </a>
        </div>
        <div class="detail-tt clearfix">
            <div class="detail-left">
                <div class="line"></div>
            </div>
            <div class="detail-center">积分明细</div>
            <div class="detail-left">
                <div class="line"></div>
            </div>
        </div>
        <div class="integral-list" id="listInt">

        </div>
    </div>
</div>
</body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script type="text/javascript" src="<%=path%>/js/aem/client/aem-integral-dx.js"></script>
<script type="text/javascript" src="<%=path%>/js/dateUtils.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
<script type="text/javascript" src="<%=path%>/js/marketing/public.js"></script>
<script type="text/javascript">

    var cid = getUrlParam("cid");

    function getUrlParam(key) {
        var reg = new RegExp("(^|&)" + key + "=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) return unescape(r[2]);
        return null;
    }

    var accessToken = $.cookie('accessToken');
    /* var accessToken="9821b0223be9d1be2c3361abd940d3bd";  */
    $(function () {
        integralhtm.init(accessToken, cid).initIntegralRecord();
        integralhtm.init(accessToken, cid).integralList(1);
    });
</script>
</html>